import request from "@/utils/request";
import { CommentDto, CommentPage, QueryComment } from "@/types/comment";

/**
 * 获取文章分类
 * @returns
 */
export const queryCommentList = (
  params: QueryComment
): ResponseResult<CommentPage> =>
  request({
    url: `${process.env.VUE_APP_BASE_API}/comment/commentList`,
    method: "GET",
    params,
  });
/**
 * 获取文章分类
 * @returns
 */
export const comment = (data: CommentDto): ResponseDefault =>
  request({
    url: `${process.env.VUE_APP_BASE_API}/comment`,
    method: "POST",
    data,
    headers: {
      login: true,
    },
  });
